<?php

//Route::group(['namespace'=>'App\Http\Controllers\Api\Task','prefix'=>'api','middleware'=>'WebAuth'],function(){

Route::group(['namespace'=>'App\Http\Controllers\Api\System','prefix'=>'api'],function(){
    //系统配置项
    Route::any('system/get_complication', 'SystemController@getComplication');
    Route::any('system/remindr_list', 'SettingController@remindrList');
});

//系统通知
Route::group(['namespace'=>'App\Http\Controllers\Api\System','prefix'=>'api','middleware'=>'WebAuth'],function(){
    //通知列表
    Route::any('system/notice_index', 'NoticeController@getList');
    //通知详情
    Route::any('system/get_notice', 'NoticeController@getNotice');
    //添加通知
    Route::post('system/add_notice', 'NoticeController@addNotice');
    //更新通知
    Route::post('system/update_notice', 'NoticeController@updateNotice');
    //删除通知
    Route::post('system/delete_notice', 'NoticeController@deleteNotice');

    //系统设置
    //获取用餐时间
    Route::any('system/dining_time', 'SettingController@diningTime');
    //设置用餐时间
    Route::any('system/set_dining_time', 'SettingController@setDiningTime');
    //获取当前用药设置
    Route::any('system/get_medicinal', 'SetMedicinalController@getList');
    //修改当前用药设置
    Route::post('system/set_medicinal', 'SetMedicinalController@updateSetMedicinal');

    //定时提醒
    Route::any('system/remindr_list', 'SettingController@remindrList');
    Route::any('system/remindr_add', 'SettingController@remindrAdd');
    Route::any('system/remindr_update', 'SettingController@remindrUpdate');
});